home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1468 / lcdarray.frm < prev    next >
Text File  |  1996-07-19  |  6KB  |  222 lines

  1. VERSION 4.00
  2. Begin VB.Form LCDArray 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "LCD Array"
  5.    ClientHeight    =   3975
  6.    ClientLeft      =   6555
  7.    ClientTop       =   345
  8.    ClientWidth     =   2895
  9.    Height          =   4380
  10.    Icon            =   "LCDArray.frx":0000
  11.    Left            =   6495
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3975
  17.    ScaleWidth      =   2895
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   0
  20.    Width           =   3015
  21.    Begin VB.PictureBox picLCD 
  22.       Height          =   375
  23.       Index           =   0
  24.       Left            =   780
  25.       ScaleHeight     =   315
  26.       ScaleWidth      =   1935
  27.       TabIndex        =   8
  28.       Top             =   360
  29.       Width           =   1995
  30.    End
  31.    Begin VB.Timer Timer1 
  32.       Interval        =   500
  33.       Left            =   840
  34.       Top             =   720
  35.    End
  36.    Begin VB.PictureBox picLCD 
  37.       Height          =   375
  38.       Index           =   4
  39.       Left            =   780
  40.       ScaleHeight     =   315
  41.       ScaleWidth      =   1935
  42.       TabIndex        =   3
  43.       Top             =   3480
  44.       Width           =   1995
  45.    End
  46.    Begin VB.PictureBox picLCD 
  47.       Height          =   375
  48.       Index           =   3
  49.       Left            =   780
  50.       ScaleHeight     =   315
  51.       ScaleWidth      =   1935
  52.       TabIndex        =   2
  53.       Top             =   1920
  54.       Width           =   1995
  55.    End
  56.    Begin VB.PictureBox picLCD 
  57.       Height          =   375
  58.       Index           =   2
  59.       Left            =   780
  60.       ScaleHeight     =   315
  61.       ScaleWidth      =   1935
  62.       TabIndex        =   1
  63.       Top             =   2700
  64.       Width           =   1995
  65.    End
  66.    Begin VB.PictureBox picLCD 
  67.       Height          =   375
  68.       Index           =   1
  69.       Left            =   780
  70.       ScaleHeight     =   315
  71.       ScaleWidth      =   1935
  72.       TabIndex        =   0
  73.       Top             =   1140
  74.       Width           =   1995
  75.    End
  76.    Begin VB.Image Image1 
  77.       Height          =   480
  78.       Index           =   4
  79.       Left            =   120
  80.       Picture         =   "LCDArray.frx":000C
  81.       Top             =   3480
  82.       Width           =   480
  83.    End
  84.    Begin VB.Image Image1 
  85.       Height          =   480
  86.       Index           =   3
  87.       Left            =   120
  88.       Picture         =   "LCDArray.frx":044E
  89.       Top             =   2640
  90.       Width           =   480
  91.    End
  92.    Begin VB.Image Image1 
  93.       Height          =   480
  94.       Index           =   2
  95.       Left            =   120
  96.       Picture         =   "LCDArray.frx":0890
  97.       Top             =   1860
  98.       Width           =   480
  99.    End
  100.    Begin VB.Image Image1 
  101.       Height          =   480
  102.       Index           =   1
  103.       Left            =   120
  104.       Picture         =   "LCDArray.frx":0CD2
  105.       Top             =   1140
  106.       Width           =   480
  107.    End
  108.    Begin VB.Image Image1 
  109.       Height          =   480
  110.       Index           =   0
  111.       Left            =   120
  112.       Picture         =   "LCDArray.frx":1114
  113.       Top             =   300
  114.       Width           =   480
  115.    End
  116.    Begin VB.Label Label1 
  117.       Alignment       =   2  'Center
  118.       Caption         =   "Washington DC"
  119.       Height          =   195
  120.       Left            =   780
  121.       TabIndex        =   9
  122.       Top             =   120
  123.       Width           =   1995
  124.    End
  125.    Begin VB.Label Label5 
  126.       Alignment       =   2  'Center
  127.       Caption         =   "Mexico City"
  128.       ForeColor       =   &H00000000&
  129.       Height          =   195
  130.       Left            =   780
  131.       TabIndex        =   7
  132.       Top             =   3240
  133.       Width           =   1995
  134.    End
  135.    Begin VB.Label Label4 
  136.       Alignment       =   2  'Center
  137.       Caption         =   "Tokyo"
  138.       Height          =   195
  139.       Left            =   780
  140.       TabIndex        =   6
  141.       Top             =   1680
  142.       Width           =   1995
  143.    End
  144.    Begin VB.Label Label3 
  145.       Alignment       =   2  'Center
  146.       Caption         =   "Madrid"
  147.       ForeColor       =   &H00000000&
  148.       Height          =   195
  149.       Left            =   780
  150.       TabIndex        =   5
  151.       Top             =   2460
  152.       Width           =   1995
  153.    End
  154.    Begin VB.Label Label2 
  155.       Alignment       =   2  'Center
  156.       Caption         =   "London"
  157.       ForeColor       =   &H00000000&
  158.       Height          =   195
  159.       Left            =   780
  160.       TabIndex        =   4
  161.       Top             =   900
  162.       Width           =   1995
  163.    End
  164. End
  165. Attribute VB_Name = "LCDArray"
  166. Attribute VB_Creatable = False
  167. Attribute VB_Exposed = False
  168. Option Explicit
  169.  
  170. Dim moLCD(4) As New CLCD
  171.  
  172.  
  173. Private Sub Form_Load()
  174. Dim i As Integer
  175.     
  176.     Screen.MousePointer = vbHourglass
  177.     
  178.     For i = 0 To 4
  179.         With moLCD(i)
  180.             .Alignment = gnCENTER
  181.             .BackColor = &H800000
  182.             .ForeColor = vbWhite
  183.              Set .Container = picLCD(i)
  184.        End With
  185.     Next i
  186.     
  187.     moLCD(0).BlinkColon = True
  188.     
  189.     Timer1_Timer
  190.     
  191.     Screen.MousePointer = vbDefault
  192.     
  193. End Sub
  194.  
  195. Private Sub Form_Unload(Cancel As Integer)
  196. Dim i As Integer
  197.     
  198.     For i = 0 To 4
  199.         Set moLCD(i) = Nothing
  200.     Next i
  201.     Set LCDArray = Nothing
  202.     
  203. End Sub
  204.  
  205. Private Static Sub Timer1_Timer()
  206. Dim vTime As Variant
  207.     
  208.     vTime = Time()
  209.     
  210.     moLCD(0).Caption = CalcTime(vTime, 0)
  211.     moLCD(1).Caption = CalcTime(vTime, 5)
  212.     moLCD(2).Caption = CalcTime(vTime, 6)
  213.     moLCD(3).Caption = CalcTime(vTime, 14)
  214.     moLCD(4).Caption = CalcTime(vTime, -1)
  215.  
  216. End Sub
  217.  
  218. Private Function CalcTime(rvTime As Variant, rnHoursDifference As Integer) As String
  219.     CalcTime = Format$(DateAdd("h", rnHoursDifference, rvTime), "h:mm A/P")
  220. End Function
  221.  
  222.